package com.atguigu.lease.web.app.mapper;

import com.atguigu.lease.model.entity.RoomInfo;
import com.atguigu.lease.web.app.vo.room.RoomItemVo;
import com.atguigu.lease.web.app.vo.room.RoomQueryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;

/**
* @author yangchengbao
* @description 针对表【room_info(房间信息表)】的数据库操作Mapper
* @createDate 2023-07-26 11:12:39
* @Entity com.atguigu.lease.model.entity.RoomInfo
*/
@Mapper
public interface RoomInfoMapper extends BaseMapper<RoomInfo> {

    /**
     * @param roomItemVoPage
     * @param queryVo
     * @Desceription: 分页查询房间列表
     * @Return: com.baomidou.mybatisplus.core.metadata.IPage<com.atguigu.lease.web.app.vo.room.RoomItemVo>
     * @Author: yangchengbao
     * @Date: 2025-01-09 10:01:46
     */
    IPage<RoomItemVo> pageItem(Page<RoomItemVo> roomItemVoPage, RoomQueryVo queryVo);

    /**
     * @param apartmentId
     * @Desceription: 查询公寓最小租金逻辑
     * @Return: java.math.BigDecimal
     * @Author: yangchengbao
     * @Date: 2025-01-11 10:01:54
     */
    BigDecimal selectMinRentByApartmentId(Long apartmentId);

    /**
     * @param roomItemVoPage
     * @param id
     * @Desceription: 根据公寓id分页查询房间列表
     * @Return: com.baomidou.mybatisplus.core.metadata.IPage<com.atguigu.lease.web.app.vo.room.RoomItemVo>
     * @Author: yangchengbao
     * @Date: 2025-01-11 10:01:12
     */
    IPage<RoomItemVo> pageItemByApartmentId(Page<RoomItemVo> roomItemVoPage, Long id);
}